﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace HYBYSoft.Company.Models
{
    [MetadataType(typeof(Category_Metadata))]
    public partial class Category
    {
        [Display(Name = "父级菜单")]
        public string ParentName { get;set; }

        public class Category_Metadata
        {
            public int CategoryID { get; set; }

            [Display(Name = "类别名称"),Required(ErrorMessage="类别名称不能为空")]
            [Remote("CheckName", "Category", ErrorMessage = "该名称已经存在，请重新输入")]
            [StringLength(16,ErrorMessage="超过字符最大数")]
            public string Name { get; set; }

            [Display(Name = "类别描述")]
            [StringLength(500, ErrorMessage = "超过字符最大数")]
            public string Description { get; set; }

            [Display(Name = "类别图标")]
            public string Icon { get; set; }

            [Display(Name = "ControllorName")]
            public string ControllorName { get; set; }

            [Display(Name = "ActionName")]
            public string ActionName { get; set; }

            [Display(Name = "父级菜单ID")]
            public int ParentID { get; set; }

            [Display(Name = "是否启用")]
            public int State { get; set; }
        }
    }
}
